<template>
    <div>
        <el-table :data="tableData" style="width: 100%">
            <el-table-column prop="userId" label="序号"  />
            <el-table-column prop="username" label="姓名" />
            <el-table-column prop="timeOfEntry" label="入职时间" />
            <el-table-column prop="mobile" label="手机号"  />
            <el-table-column prop="idNumber" label="身份证号" />
            <el-table-column prop="theHighestDegreeOfEducation" label="学历" />
            <el-table-column prop="openingBank" label="开户行"  />
            <el-table-column prop="firstLevelDepartment" label="一级部门" />
            <el-table-column prop="twoLevelDepartment" label="二级部门" />
            <el-table-column prop="-" label="工资城市"  />
            <el-table-column prop="-" label="社保电脑号" />
            <el-table-column prop="-" label="公积金账号" />
            <el-table-column prop="leaveDate" label="离职时间"  />
            <el-table-column prop="householdRegistrationType" label="户籍类型" />
            <el-table-column prop="participatingInTheCity" label="参保城市" />
            <el-table-column prop="socialSecurityMonth" label="社保月份"  />
            <el-table-column prop="socialSecurityBase" label="社保基数" />
            <el-table-column prop="socialSecurity" label="社保合计" />
            <el-table-column prop="socialSecurityEnterprise" label="社保企业"  />
            <el-table-column prop="socialSecurityIndividual" label="社保个人" />
            <el-table-column prop="providentFundCity" label="公积金城市" />
            <el-table-column prop="providentFundMonth" label="公积金月份"  />
            <el-table-column prop="providentFundBase" label="公积金基数" />
            <el-table-column prop="accumulationFundEnterpriseBase" label="公积金企业基数" />
        </el-table>
        <el-button type="primary" @click="gd">归档</el-button>
        <el-button type="primary" @click="add">新建报表</el-button>
        <el-button @click="back">取消</el-button>
        <!-- <button @click="gd">归档</button>
        <button @click="add">新建报表</button> -->

        <!-- <el-button :plain="true" @click="open2">Success</el-button> -->
    </div>
</template>

<script setup lang="ts">
import { ref, onMounted } from 'vue'
import { getBb ,getAdd,Gd} from '../api/axios'
import { ElMessage } from 'element-plus'
import {useRouter} from 'vue-router'
let tableData=ref([])
let get = async () => {
    let res = await getBb()
    console.log(res.data.data);
    tableData.value=res.data.data
}
const gd=async ()=>{
    let res=await Gd()
    console.log(res.data);
    console.log(res.data.code);
    if(res.data.code=='10000'){
        console.log(true);
        
        open2()
    }
}
const router=useRouter()
const back=()=>{
    router.push('/social')
}
const open2 = () => {
  ElMessage({
    message: '归档成功',
    type: 'success',
  })
}
const add=async ()=>{
    let res=await getAdd()
    
}
onMounted(() => {
    get()
})

</script>

<style scoped>

</style>